package com.ruoyi.client.service.impl;

import com.ruoyi.client.domain.MyAccount;
import com.ruoyi.client.mapper.MyAccountMapper;
import com.ruoyi.client.service.IMyAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class MyAccountServiceImpl implements IMyAccountService {
    @Autowired
    MyAccountMapper myAccountMapper;
    @Override
    public MyAccount selectMyAccount(String name) {
        return myAccountMapper.selectMyAccount(name);
    }

    @Override
    public void updateById(BigDecimal balance,Integer id) {
        myAccountMapper.updateById(balance,id);
    }

    @Override
    public void updateByOutTradeNo(MyAccount myAccount) {
        myAccountMapper.updateByOutTradeNo(myAccount);
    }

    @Override
    public MyAccount selectMyAccountByOutTradeNo(String outTradeNo) {
        return myAccountMapper.selectMyAccountByOutTradeNo(outTradeNo);
    }


}
